home *** CD-ROM | disk | FTP | other *** search
/ Invisible Universe / Invisible Universe (1995)(Voyager)[Mac-PC].iso / mac / MOVIES / Full Text Poetry.DIR / 00005_Script_5 < prev    next >
Text File  |  1995-11-13  |  5KB  |  156 lines

  1. on showHilite
  2.   global gCurrChan,gFirsChan,gLastChan,gPoetryButtons,gPrevHilite
  3.   goMovieGo
  4.   
  5.   testOverheadMenu
  6.   
  7.   put getAprop(gPoetryButtons,gCurrChan) into thisOne
  8.   if rollOver(gCurrChan) then
  9.     put the puppet of sprite gCurrChan into pState
  10.     puppetSprite gCurrChan,false
  11.     put the castnum of sprite gCurrChan into it
  12.     set the puppet of sprite gCurrChan to pState
  13.     goMovieGo
  14.     if (it<>0) then
  15.       if gCurrChan <> gPrevHilite then
  16.         rollo(thisOne)
  17.         put gCurrChan into gPrevHilite
  18.       end if
  19.       goMovieGo
  20.       if the mouseDown then
  21.         press(thisOne)
  22.         put 0 into gPrevHilite
  23.         goMovieGo
  24.         if rollover(gCurrChan) then
  25.           doScript(thisOne)
  26.           norm(thisOne)
  27.         end if
  28.       end if
  29.     else
  30.       put gCurrChan+1 into gCurrChan
  31.       if gCurrChan > gLastChan then put gFirsChan into gCurrChan
  32.       goMovieGo
  33.     end if
  34.   else
  35.     if gCurrChan = gPrevHilite then norm(thisOne)
  36.     put 0 into gPrevHilite
  37.     put gCurrChan+1 into gCurrChan
  38.     if gCurrChan > gLastChan then put gFirsChan into gCurrChan
  39.     goMovieGo
  40.   end if
  41.   goMovieGo
  42. end showHilite
  43.  
  44. on nextPage
  45.   global gPoemIsPlaying,gLastPage
  46.   if gLastPage then exit
  47.   if not(gPoemIsPlaying ) then puppetTransition 02,1,24,true
  48.   go to (the frame)+1
  49.   setUpPage "next"
  50.   updateStage
  51. end nextPage
  52.  
  53. on prevPage
  54.   global gPoemIsPlaying, gPageIndex
  55.   if gPageIndex = 1 then exit
  56.   if not(gPoemIsPlaying ) then  puppetTransition 01,1,24,true
  57.   go to (the frame)-1
  58.   setUpPage "prev"
  59.   updateStage
  60. end prevPage
  61.  
  62. on nextPoem
  63.   global gPoemLabel, gPageIndex
  64.   puppetTransition 50,1,120,false
  65.   stopPoem
  66.   if gPoemLabel = "P96" then go frame "P11"
  67.   else go to marker(1)
  68.   addToRetrace
  69.   put 0 into gPageIndex
  70.   setUpPage "next"
  71.   updateStage
  72. end nextPoem
  73.  
  74. on prevPoem
  75.   global gPoemLabel, gPageIndex
  76.   puppetTransition 50,1,120,false
  77.   stopPoem
  78.   if gPoemLabel = "P11" then go frame "P96"
  79.   else go to marker(-1)
  80.   addToRetrace
  81.   put 0 into gPageIndex
  82.   setUpPage "next"
  83.   updateStage
  84. end prevPoem
  85.  
  86. on hearPoem
  87.   global gPoemLabel,gPoemIsPlaying, gVolume, gPageTurnTime,gPageIndex
  88.   if (the movieRate of sprite 10) > 0 and (the movieTime of sprite 10) > 0 then
  89.     stopPoem
  90.   else
  91.     puppetSprite 10, true
  92.     repeat while true
  93.       preloadcast gPoemLabel
  94.       if the loaded of cast gPoemLabel then exit repeat
  95.     end repeat
  96.     set the movieRate of sprite 10 to .0001
  97.     set the volume of sprite 10 to gVolume*36
  98.     set the movieTime of sprite 10 to 0
  99.     put line gPageIndex of field(the castNum of sprite 9) into it
  100.     set the startTime of sprite 10 to integer(it)
  101.     set the stopTime of sprite 10 to (the duration of cast gPoemLabel)
  102.     set the movieRate of sprite 10 to 1
  103.     put true into gPoemIsPlaying
  104.     puppetSprite 10, false
  105.     updateStage
  106.   end if
  107. end hearPoem
  108.  
  109. on stopPoem
  110.   global gPoemLabel, gPoemIsPlaying
  111.   if gPoemIsPlaying then
  112.     repeat with i = 1 to 8
  113.       set the volume of sprite 10 to (the volume of sprite 10)-32
  114.       delay 8
  115.     end repeat
  116.     set the movieRate of sprite 10 to 0
  117.     set the startTime of sprite 10 to 0
  118.     repeat while true
  119.       unloadcast gPoemLabel
  120.       if not(the loaded of cast gPoemLabel) then exit repeat
  121.     end repeat
  122.     put false into gPoemIsPlaying
  123.   end if
  124. end stopPoem
  125.  
  126. on goMovieGo
  127.   global gPoemLabel, gPoemIsPlaying, gPageTurnTime, gLastPage,gVolume
  128.   if not(gPoemIsPlaying) then exit
  129.   put (the movieTime of sprite 10) into it
  130.   if it < gPageTurnTime then set the movieRate of sprite 10 to 1
  131.   if abs(it- gPageTurnTime) <4  then
  132.     if gLastPage then stopPoem
  133.     else nextPage
  134.   end if
  135.   updateStage
  136. end goMovieGo
  137.  
  138. on setUpPage whichWay
  139.   global gPoemIsPlaying, gPageTurnTime, gPageIndex, gPoemLabel, gLastPage
  140.   if whichWay = "prev" then put gPageIndex-1 into gPageIndex
  141.   else put gPageIndex+1 into gPageIndex
  142.   put the castNum of sprite 9 into theField
  143.   if theField<> 0 then
  144.     put the text of field theField into theTimes
  145.     put  integer(line gPageIndex of theTimes) into pageTime
  146.     put integer(line gPageIndex+1 of theTimes) into gPageTurnTime
  147.     put (the castNum of sprite 2=0) into gLastPage
  148.     put (gPageTurnTime = the duration of cast gPoemLabel) into gLastPage
  149.     if ( whichWay = "prev" and (the movieTime of sprite 10) >= pageTime) or¼
  150.           (whichWay = "next" and (the movieTime of sprite 10) <= pageTime) then
  151.       set the movieTime of sprite 10 to pageTime
  152.     end if
  153.   else
  154.     put (the castNum of sprite 2=0) into gLastPage
  155.   end if
  156. end setUpPage